package hong.jun.dao;

import dev.morphia.Datastore;
import dev.morphia.dao.BasicDAO;
import hong.jun.MongoMgr;
import hong.jun.data.player.Player;

/**
 * @Description:
 * @Author: yanghongjun
 * @Date: 2023/11/17
 **/
public class PlayerDao extends BasicDAO<Player, Long> {
    public static PlayerDao dao = creatDao();

    public PlayerDao(Class<Player> entityClass, Datastore ds) {
        super(entityClass, ds);
    }


    public static PlayerDao creatDao() {
        Datastore datastore = MongoMgr.getInstance().getDatastore();
        return new PlayerDao(Player.class, datastore);
    }
    public static PlayerDao getInstance(){
        return dao;
    }

}
